package com.zb.zbtbackend.feignclient;

import com.zb.zbtbackend.vo.News;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(value="ZBT-COMMON")
public interface NewsFeignClient {
    @RequestMapping("/zbt/common/news/saveNews")
    String saveNews(@RequestBody(required = false) News news);

    @RequestMapping("/zbt/common/news/updateNews")
    String updateNews(@RequestBody(required = false) News news);

    @RequestMapping("/zbt/common/news/deleNews")
    String deleNews(@RequestParam("newsid") String newsid);

    @RequestMapping("/zbt/common/news/findNewsById")
    String findNewsById(@RequestParam("newsid") String newsid);

    @RequestMapping("/zbt/common/news/findNewsList")
    String findNewsList(
            @RequestParam("newstypeid") String newstypeid,
            @RequestParam("currentPage") String currentPage
    );

}
